package com.hdc.sell.utils;

import com.hdc.sell.vo.ResultVO;

/**
 * @author 郭丽然
 * @program: sell
 * @date 2020/4/27 20:55
 * 功能：
 */
public class ResultVOUtil {
    //返回成功
    public static ResultVO success(Object object) {
        ResultVO resultVO=new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        resultVO.setData(object);
        return resultVO;
    }
    public static ResultVO success() {
        ResultVO resultVO=new ResultVO();
        resultVO.setCode(0);
        resultVO.setMsg("成功");
        return resultVO;
    }
    //返回失败
    public static ResultVO error(Integer code,String msg) {
        ResultVO resultVO=new ResultVO();
        resultVO.setCode(code);
        resultVO.setMsg(msg);
        return resultVO;
    }
}
